/*
 * Copyright 2012 Gregor Schauer
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package at.schauer.gregor.vienna.test;

import java.io.Serializable;
import java.util.UUID;

/**
 * @author Gregor Schauer
 */
public class SimpleObject implements Serializable {
	UUID id;
	Boolean aBoolean;
	Byte aByte;
	Character aCharacter;
	Short aShort;
	Integer aInteger;
	Long aLong;
	Float aFloat;
	Double aDouble;

	public SimpleObject() {
	}

	public SimpleObject(UUID id, Boolean aBoolean, Byte aByte, Character aCharacter, Short aShort, Integer aInteger, Long aLong, Float aFloat, Double aDouble) {
		this.id = id;
		this.aBoolean = aBoolean;
		this.aByte = aByte;
		this.aCharacter = aCharacter;
		this.aShort = aShort;
		this.aInteger = aInteger;
		this.aLong = aLong;
		this.aFloat = aFloat;
		this.aDouble = aDouble;
	}

	public UUID getId() {
		return id;
	}

	public void setId(UUID id) {
		this.id = id;
	}

	public Boolean getaBoolean() {
		return aBoolean;
	}

	public void setaBoolean(Boolean aBoolean) {
		this.aBoolean = aBoolean;
	}

	public Byte getaByte() {
		return aByte;
	}

	public void setaByte(Byte aByte) {
		this.aByte = aByte;
	}

	public Character getaCharacter() {
		return aCharacter;
	}

	public void setaCharacter(Character aCharacter) {
		this.aCharacter = aCharacter;
	}

	public Short getaShort() {
		return aShort;
	}

	public void setaShort(Short aShort) {
		this.aShort = aShort;
	}

	public Integer getaInteger() {
		return aInteger;
	}

	public void setaInteger(Integer aInteger) {
		this.aInteger = aInteger;
	}

	public Long getaLong() {
		return aLong;
	}

	public void setaLong(Long aLong) {
		this.aLong = aLong;
	}

	public Float getaFloat() {
		return aFloat;
	}

	public void setaFloat(Float aFloat) {
		this.aFloat = aFloat;
	}

	public Double getaDouble() {
		return aDouble;
	}

	public void setaDouble(Double aDouble) {
		this.aDouble = aDouble;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		SimpleObject that = (SimpleObject) o;

		if (aBoolean != null ? !aBoolean.equals(that.aBoolean) : that.aBoolean != null) {
			return false;
		}
		if (aByte != null ? !aByte.equals(that.aByte) : that.aByte != null) {
			return false;
		}
		if (aCharacter != null ? !aCharacter.equals(that.aCharacter) : that.aCharacter != null) {
			return false;
		}
		if (aDouble != null ? !aDouble.equals(that.aDouble) : that.aDouble != null) {
			return false;
		}
		if (aFloat != null ? !aFloat.equals(that.aFloat) : that.aFloat != null) {
			return false;
		}
		if (aInteger != null ? !aInteger.equals(that.aInteger) : that.aInteger != null) {
			return false;
		}
		if (aLong != null ? !aLong.equals(that.aLong) : that.aLong != null) {
			return false;
		}
		if (aShort != null ? !aShort.equals(that.aShort) : that.aShort != null) {
			return false;
		}
		if (id != null ? !id.equals(that.id) : that.id != null) {
			return false;
		}

		return true;
	}

	@Override
	public int hashCode() {
		int result = id != null ? id.hashCode() : 0;
		result = 31 * result + (aBoolean != null ? aBoolean.hashCode() : 0);
		result = 31 * result + (aByte != null ? aByte.hashCode() : 0);
		result = 31 * result + (aCharacter != null ? aCharacter.hashCode() : 0);
		result = 31 * result + (aShort != null ? aShort.hashCode() : 0);
		result = 31 * result + (aInteger != null ? aInteger.hashCode() : 0);
		result = 31 * result + (aLong != null ? aLong.hashCode() : 0);
		result = 31 * result + (aFloat != null ? aFloat.hashCode() : 0);
		result = 31 * result + (aDouble != null ? aDouble.hashCode() : 0);
		return result;
	}
}
